<div style="text-align: center;">
    <ul id="pagination" class="pagination"></ul>
</div>
<script>
    //分页
    $(function(){
        $("#pagination").twbsPagination({
            totalPages: ${pageInfo.pages}||1,//如果前面为空,就用1代替
                startPage: ${pageInfo.pageNum} || 1,
                visiblePages:5,//显示页数
                first:"首页",
                prev:"上页",
                next:"下页",
                last:"尾页",
                initiateStartPageClick:false,
                onPageClick:function(event,page){
            $("#currentPage").val(page);//跳转到想去的页码
            $("#searchForm").submit();//提交表单
        }
    });
    })
</script>